import LocalizedStrings from 'react-localization';
import { zh } from './zh';

const local_string = new LocalizedStrings({
    zhcn: zh,
});

const loc = (k) => local_string[k];

const loc_set_zh = () => local_string.setLanguage('zhcn');

const init_lang = () => {
    const ret = sessionStorage.getItem('lang');
    if (!ret) {
        return;
    }

    loc_set_zh();
};

init_lang();

export {loc};
